package com.peppa.service;

import com.spring.AutoWired;
import com.spring.BeanNameAware;
import com.spring.Component;
import com.spring.Scope;

@Component("userService")
@Scope("prototype")
public class UserService implements BeanNameAware {
    @AutoWired
    private OrderService orderService;

    private String beanName;

    public  void test(){
        System.out.println(orderService);
        System.out.println(beanName);
    }

    @Override
    public void setBeanName(String name) {
        beanName=name;
    }
}
